// 班级管理模拟数据
export const mockClassList = [
  {
    id: 1,
    classCode: 'Java企业级',
    className: 'Java企业级开发',
    grade: 'JF2503',
    teacherName: '陈老师',
    teacherAvatar: '',
    studentCount: 35,
    establishDate: '2025-01-01',
    status: 'active',
    description: '专注于Java企业级应用开发，涵盖Spring Boot、微服务等现代技术栈。',
    inviteCode: 'JAVA001'
  },
  {
    id: 2,
    classCode: 'Python数据',
    className: 'Python数据分析',
    grade: 'PY2501',
    teacherName: '林老师',
    teacherAvatar: '',
    studentCount: 28,
    establishDate: '2025-01-15',
    status: 'active',
    description: 'Python数据分析与机器学习，从基础到实战项目。',
    inviteCode: 'PYTHON001'
  }

]

export const mockGradeOptions = [
  { value: '一年级', label: '一年级' },
  { value: '二年级', label: '二年级' },
  { value: '三年级', label: '三年级' },
  { value: '四年级', label: '四年级' },
  { value: '五年级', label: '五年级' },
  { value: '六年级', label: '六年级' },
  { value: '初一', label: '初一' },
  { value: '初二', label: '初二' },
  { value: '初三', label: '初三' },
  { value: '高一', label: '高一' },
  { value: '高二', label: '高二' },
  { value: '高三', label: '高三' },
  { value: '正班机', label: '正班机' }
]

export const mockStatusOptions = [
  { value: 'active', label: '正常' },
  { value: 'graduated', label: '已毕业' },
  { value: 'inactive', label: '停用' }
]

export const mockStudentList = [
  {
    id: 1,
    name: '张三',
    studentId: '2023001',
    avatar: '',
    joinDate: '2023-09-01',
    status: 'active'
  },
  {
    id: 2,
    name: '李四',
    studentId: '2023002',
    avatar: '',
    joinDate: '2023-09-01',
    status: 'active'
  },
  {
    id: 3,
    name: '王五',
    studentId: '2023003',
    avatar: '',
    joinDate: '2023-09-01',
    status: 'active'
  }
]

export const mockApplications = [
  {
    id: 1,
    studentName: '小明',
    studentId: '2024001',
    className: 'Java企业级开发',
    classId: 9,
    applyDate: '2025-01-20',
    reason: '希望学习Java企业级开发，提升编程技能',
    status: 'pending'
  },
  {
    id: 2,
    studentName: '小红',
    studentId: '2024002',
    className: 'Python数据分析',
    classId: 10,
    applyDate: '2025-01-18',
    reason: '对数据分析和机器学习很感兴趣',
    status: 'pending'
  },
  {
    id: 3,
    studentName: '小李',
    studentId: '2024003',
    className: '初一1班',
    classId: 8,
    applyDate: '2025-01-10',
    reason: '想要挑战更高难度的学习内容',
    status: 'rejected',
    rejectReason: '班级人数已满'
  }
]

// 模拟API响应
export const createMockResponse = (data, total = null) => {
  if (total !== null) {
    return {
      data,
      total,
      success: true,
      message: '操作成功'
    }
  }
  return {
    data,
    success: true,
    message: '操作成功'
  }
}

export const createMockError = (message = '操作失败') => {
  return {
    success: false,
    message,
    error: message
  }
}
